package pers.lonestar.framework.utils.support.analysis.handler;

import org.apache.poi.xssf.usermodel.XSSFRichTextString;

import pers.lonestar.framework.utils.support.contexts.XlsxReadContext;
import pers.lonestar.framework.utils.support.metadata.CellData;
import pers.lonestar.framework.utils.support.metadata.read.ReadSheet;

public class CellInlineStringHandler extends AbstractCellValueTagHandler {
    @Override
    protected void setStringValue(XlsxReadContext xlsxReadContext, ReadSheet readSheet) {
        CellData<?> tempCellData = readSheet.getTempCellData();
        XSSFRichTextString richTextString = new XSSFRichTextString(tempCellData.getStringValue());
        tempCellData.setStringValue(richTextString.toString());
    }
}
